home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / Languages / MacHaskell 2.2 / progs / lib / X11 / xlibprims.hi < prev    next >
Encoding:
Text File  |  1994-09-27  |  42.2 KB  |  1,448 lines  |  [TEXT/YHS2]

  1. -- 4/13/93 add xTestEventMask, xTestStateMask
  2. -- 4/14/93 add xMArrayLength,
  3. --             xGetEventN
  4. -- 4/15/93 change xKeycodeCharacter
  5. --         add xKeysymCharacter
  6. --         add xHandleError
  7. --         add xError
  8. -- 4/27/93 Change Bool to XSwitch in XWinAttribute, XGCAttribute
  9.  
  10. interface XLibPrims where
  11.  
  12. import XLibTypes(
  13.                  XDisplay, XScreen, XWindow, XGcontext, XPixmap,
  14.                  XColormap, XCursor, XFont, XImage, XMaybe,
  15.                  XBitmap, XKeysymTable, XBitVec,
  16.                  XPixarray, XByteVec, XAtom, XProperty,
  17.                  XPixel, XDrawable, XTime, XSwitch,
  18.          XWindowPlace, XEventMode, XEventKind,
  19.          XWindowVisibility, XWindowStackMode,
  20.          XPropertyState, XMapReqType, XGraphFun,
  21.          XEvent, XEventType, XEventSlot, XEventMask,
  22.          XEventMaskKey, XStateMask, XStateMaskKey,
  23.          XWinAttribute,XGCAttribute, XImAttribute, 
  24.          XGrabAttribute, XArcMode, XCapStyle,
  25.          XClipMask, XFillRule, XFillStyle, 
  26.          XFunction, XJoinStyle, XLineStyle,
  27.          XSubwindowMode, XPoint, XSize, XRect,
  28.          XArc, XBitmapFormat, XByteOrder,
  29.          XPixmapFormat, XVisualInfo, XVisualClass,
  30.          XFillContent, XBackingStore, XGravity,
  31.          XWindowClass, XMapState, XImageData, 
  32.          XImageFormat, XImageType, XDrawDirection,
  33.          XColor, XInputFocus, XGrabStatus,
  34.          XKeysym, XCloseDownMode, XScreenSaver, XMArray,
  35.                  TimeZone)
  36.  
  37.  
  38. xEventType        :: XEvent -> XEventType
  39. xEventWindow         :: XEvent -> XWindow
  40. xEventEventWindow    :: XEvent -> XWindow
  41. xEventCode        :: XEvent -> Int
  42. xEventPos        :: XEvent -> XPoint
  43. xEventState        :: XEvent -> XStateMask
  44. xEventTime        :: XEvent -> XTime
  45. xEventRoot        :: XEvent -> XWindow
  46. xEventRootPos        :: XEvent -> XPoint
  47. xEventChild        :: XEvent -> (XMaybe XWindow)
  48. xEventSameScreenP    :: XEvent -> Bool
  49. xEventHintP        :: XEvent -> Bool
  50. xEventMode        :: XEvent -> XEventMode
  51. xEventKind        :: XEvent -> XEventKind
  52. xEventFocusP        :: XEvent -> Bool
  53. xEventKeymap        :: XEvent -> XBitVec
  54. xEventRequest        :: XEvent -> XMapReqType
  55. xEventStart        :: XEvent -> Int
  56. xEventCount        :: XEvent -> Int
  57. xEventRect        :: XEvent -> XRect
  58. xEventDrawable        :: XEvent -> XDrawable
  59. xEventXGraphFun        :: XEvent -> XGraphFun
  60. xEventPlace        :: XEvent -> XWindowPlace
  61. xEventBorderWidth    :: XEvent -> Int
  62. xEventAboveSibling    :: XEvent -> (XMaybe XWindow)
  63. xEventOverrideRedirectP    :: XEvent -> Bool
  64. xEventParent        :: XEvent -> XWindow
  65. xEventConfigureP    :: XEvent -> Bool
  66. xEventVisibility    :: XEvent -> XWindowVisibility
  67. xEventNewP        :: XEvent -> Bool
  68. xEventInstalledP    :: XEvent -> Bool
  69. xEventStackMode        :: XEvent -> XWindowStackMode
  70. xEventValueMask        :: XEvent -> Int
  71. xEventSize        :: XEvent -> XSize
  72. xEventMessage        :: XEvent -> XProperty
  73. xEventPropertyState    :: XEvent -> XPropertyState
  74. xEventAtom        :: XEvent -> XAtom
  75. xEventSelection        :: XEvent -> XAtom
  76. xEventTarget        :: XEvent -> XAtom
  77. xEventProperty        :: XEvent -> (XMaybe XAtom)
  78. xEventRequestor        :: XEvent -> XWindow
  79.  
  80. xSetEventMaskKey     :: XEventMask -> XEventMaskKey -> XEventMask
  81. xClearEventMaskKey     :: XEventMask -> XEventMaskKey -> XEventMask
  82. xTestEventMaskKey     :: XEventMask -> XEventMaskKey -> Bool
  83.  
  84. xSetStateMaskKey     :: XStateMask -> XStateMaskKey -> XStateMask
  85. xClearStateMaskKey     :: XStateMask -> XStateMaskKey -> XStateMask
  86. xTestStateMaskKey     :: XStateMask -> XStateMaskKey -> Bool
  87.  
  88.  
  89. -- DISPLAYS
  90.  
  91. -- open
  92.  
  93. xOpenDisplay             :: String         -- host:display
  94.                 -> IO XDisplay
  95.  
  96. -- display attributes
  97.  
  98. xDisplayAuthorizationData    :: XDisplay -> String
  99. xDisplayAuthorizationName    :: XDisplay -> String
  100. xDisplayBitmapFormat        :: XDisplay -> XBitmapFormat
  101. xDisplayByteOrder        :: XDisplay -> XByteOrder
  102. xDisplayDisplay         :: XDisplay -> Int
  103. xDisplayImageLsbFirstP        :: XDisplay -> Bool
  104. xDisplayMaxKeycode        :: XDisplay -> Int
  105. xDisplayMaxRequestLength    :: XDisplay -> Int
  106. xDisplayMinKeycode        :: XDisplay -> Int
  107. xDisplayMotionBufferSize    :: XDisplay -> Int
  108. xDisplayPixmapFormats        :: XDisplay -> [XPixmapFormat]
  109. xDisplayProtocolMajorVersion    :: XDisplay -> Int
  110. xDisplayProtocolMinorVersion    :: XDisplay -> Int
  111. xDisplayResourceIdBase        :: XDisplay -> Int
  112. xDisplayResourceIdMask        :: XDisplay -> Int 
  113. xDisplayRoots             :: XDisplay -> [XScreen] 
  114. xDisplayVendorName        :: XDisplay -> String 
  115. xDisplayReleaseNumber        :: XDisplay -> Int
  116.  
  117. -- output buffer
  118.  
  119. xDisplayAfterFunction        :: XDisplay -> XMaybe (IO ())
  120. xSetDisplayAfterFunction     :: XDisplay -> XMaybe (IO ()) -> IO ()
  121. xDisplayForceOutput         :: XDisplay -> IO ()
  122. xDisplayFinishOutput        :: XDisplay -> IO ()
  123.  
  124. -- close
  125.  
  126. xCloseDisplay             :: XDisplay -> IO ()
  127.  
  128. -- SCREENS
  129.  
  130. xScreenBackingStores        :: XScreen -> XBackingStore
  131. xScreenBlackPixel        :: XScreen -> XPixel
  132. xScreenDefaultColormap        :: XScreen -> XColormap
  133. xScreenDepths            :: XScreen -> [(Int, [XVisualInfo])]
  134. xScreenEventMaskAtOpen        :: XScreen -> XEventMask
  135. xScreenSize            :: XScreen -> XSize 
  136. xScreenMMSize             :: XScreen -> XSize 
  137. xScreenMaxInstalledMaps        :: XScreen -> Int 
  138. xScreenMinInstalledMaps        :: XScreen -> Int 
  139. xScreenRoot            :: XScreen -> XWindow 
  140. xScreenRootDepth        :: XScreen -> Int
  141. xScreenRootVisual        :: XScreen -> Int
  142. xScreenSaveUndersP        :: XScreen -> Bool 
  143. xScreenWhitePixel        :: XScreen -> XPixel
  144.  
  145. -- WINDOWS AND PIXMAPS
  146.  
  147. -- drawables
  148.  
  149. xDrawableDisplay    :: XDrawable -> XDisplay
  150. xDrawableEqual        :: XDrawable -> XDrawable -> Bool
  151. xDrawableId        :: XDrawable -> Int
  152.  
  153. -- creating windows
  154.  
  155. xCreateWindow         :: XWindow         -- parent
  156.             -> XRect        -- (x,y,width,height)
  157.             -> [XWinAttribute]     -- optional arguments
  158.             -> IO XWindow
  159.  
  160. -- window attributes
  161.  
  162. xWindowBorderWidth     :: XWindow -> IO Int 
  163. xSetWindowBorderWidth     :: XWindow -> Int -> IO ()
  164.  
  165. xDrawableDepth        :: XDrawable -> Int
  166.  
  167. xDrawableSize         :: XDrawable -> IO XSize 
  168. xDrawableResize     :: XDrawable -> XSize -> IO ()
  169.  
  170. xWindowPos         :: XWindow -> IO XPoint 
  171. xWindowMove         :: XWindow -> XPoint -> IO ()
  172.  
  173. xWindowAllEventMasks    :: XWindow -> IO XEventMask
  174. xSetWindowBackground     :: XWindow -> XFillContent -> IO ()
  175.  
  176. xWindowBackingPixel     :: XWindow -> IO XPixel 
  177. xSetWindowBackingPixel     :: XWindow -> XPixel -> IO ()
  178.  
  179. xWindowBackingPlanes     :: XWindow -> IO XPixel 
  180. xSetWindowBackingPlanes    :: XWindow -> XPixel -> IO ()
  181.  
  182. xWindowBackingStore     :: XWindow -> IO XBackingStore
  183. xSetWindowBackingStore     :: XWindow -> XBackingStore -> IO ()
  184.  
  185. xWindowBitGravity    :: XWindow -> IO XGravity
  186. xSetWindowBitGravity    :: XWindow -> XGravity -> IO ()
  187.  
  188. xSetWindowBorder     :: XWindow -> XFillContent -> IO ()
  189.  
  190. xWindowClass         :: XWindow -> XWindowClass 
  191.  
  192. xWindowColorMap     :: XWindow -> IO (XMaybe XColormap)
  193. xSetWindowColorMap     :: XWindow -> XColormap -> IO ()
  194. xWindowColormapInstalledP :: XWindow -> IO Bool
  195.  
  196. xSetWindowCursor     :: XWindow -> (XMaybe XCursor) -> IO () 
  197.  
  198. xWindowDisplay         :: XWindow -> XDisplay
  199.  
  200. xWindowDoNotPropagateMask    :: XWindow -> IO XEventMask
  201. xSetWindowDoNotPropagateMask    :: XWindow -> XEventMask -> IO ()
  202.  
  203. xWindowEqual        :: XWindow -> XWindow -> Bool
  204.  
  205. xWindowEventMask    :: XWindow -> IO XEventMask
  206. xSetWindowEventMask    :: XWindow -> XEventMask -> IO ()
  207.  
  208. xWindowGravity        :: XWindow -> IO XGravity
  209. xSetWindowGravity    :: XWindow -> XGravity -> IO ()
  210.  
  211. xWindowId        :: XWindow -> Int
  212.  
  213. xWindowMapState        :: XWindow -> IO XMapState
  214.  
  215. xWindowOverrideRedirect        :: XWindow -> IO XSwitch
  216. xSetWindowOverrideRedirect    :: XWindow -> XSwitch -> IO ()
  217.  
  218. xSetWindowPriority    :: XWindow -> XWindowStackMode -> IO ()
  219.  
  220. xWindowSaveUnder    :: XWindow -> IO XSwitch
  221. xSetWindowSaveUnder    :: XWindow -> XSwitch -> IO ()
  222.  
  223. xWindowVisual        :: XWindow -> Int
  224.  
  225. -- stacking order
  226.  
  227. xCirculateWindowDown    :: XWindow -> IO () 
  228. xCirculateWindowUp    :: XWindow -> IO ()
  229.  
  230. -- window hierarchy
  231.  
  232. xDrawableRoot        :: XDrawable -> IO XWindow
  233. xQueryTree        :: XWindow -> IO ([XWindow],     -- children
  234.                          XMaybe XWindow,-- parent
  235.                          XWindow)     -- root
  236.  
  237. xReparentWindow        :: XWindow             -- window
  238.             -> XWindow             -- parent
  239.             -> XPoint             -- (x,y)
  240.             -> IO ()
  241.  
  242. xTranslateCoordinates    :: XWindow             -- source
  243.             -> XPoint             -- (source-x,source-y)
  244.             -> XWindow             -- destination
  245.             -> IO (XMaybe XPoint)        -- (dest-x,dest-y)
  246.  
  247. -- mapping windows
  248.  
  249. xMapWindow         :: XWindow -> IO () 
  250. xMapSubwindows         :: XWindow -> IO ()
  251. xUnmapWindow        :: XWindow -> IO () 
  252. xUnmapSubwindows    :: XWindow -> IO ()
  253.  
  254. -- destroying windows
  255.  
  256. xDestroyWindow        :: XWindow -> IO () 
  257. xDestroySubwindows    :: XWindow -> IO ()
  258.  
  259. -- pixmaps
  260.  
  261. xCreatePixmap         :: XSize             -- (width,height)
  262.             -> Int                 -- depth
  263.             -> XDrawable             -- drawable
  264.             -> IO XPixmap 
  265.  
  266. xFreePixmap         :: XPixmap -> IO ()
  267.  
  268. xPixmapDisplay        :: XPixmap -> XDisplay
  269. xPixmapEqual        :: XPixmap -> XPixmap -> Bool
  270.  
  271. -- GRAPHICS CONTEXTS
  272.  
  273. xCreateGcontext        :: XDrawable             -- drawable
  274.             -> [XGCAttribute]         -- optional arguments
  275.             -> IO XGcontext
  276.  
  277. xUpdateGcontext     :: XGcontext             -- old gcontext
  278.             -> [XGCAttribute]         -- changes
  279.             -> IO ()            -- new gcontext
  280.  
  281. xFreeGcontext        :: XGcontext -> IO ()
  282.  
  283. xGcontextDisplay    :: XGcontext -> XDisplay
  284. xGcontextEqual        :: XGcontext -> XGcontext -> Bool
  285.  
  286. xGcontextId        :: XGcontext -> Int
  287.  
  288. xQueryBestStipple    :: XSize -> XDrawable -> XSize
  289. xQueryBestTile        :: XSize -> XDrawable -> XSize
  290.  
  291. xCopyGcontext        :: XGcontext             -- source
  292.             -> XGcontext            -- destination
  293.             -> IO ()
  294.  
  295. -- GRAPHICS OPERATIONS
  296.  
  297. xClearArea         :: XWindow             -- window
  298.             -> XRect             -- (x,y,width,height)
  299.             -> Bool             -- exposure-p
  300.             -> IO ()
  301.  
  302. xCopyArea        :: XDrawable             -- source
  303.             -> XGcontext             -- gcontext
  304.             -> XRect             -- (src-x,src-y,w,h)
  305.             -> XDrawable            -- destination
  306.             -> XPoint             -- (dest-x,dest-y)
  307.             -> IO ()
  308.  
  309. xCopyPlane        :: XDrawable             -- source
  310.             -> XGcontext             -- gcontext
  311.             -> XPixel             -- plane
  312.             -> XRect            -- (src-x,src-y,w,h)
  313.                         -> XDrawable             -- destination
  314.             -> XPoint             -- (dest-x,dest-y)
  315.             -> IO ()
  316.  
  317. xDrawPoint        :: XDrawable             -- drawable
  318.             -> XGcontext             -- gcontext
  319.             -> XPoint             -- (x,y)
  320.             -> IO ()
  321.  
  322. xDrawPoints        :: XDrawable             -- drawable
  323.             -> XGcontext             -- gcontext
  324.             -> [XPoint]            -- points
  325.             -> IO ()
  326.  
  327. xDrawLine         :: XDrawable             -- drawable
  328.             -> XGcontext             -- gcontext
  329.             -> XPoint             -- (x1,y1)
  330.             -> XPoint             -- (x2,y2)
  331.             -> IO ()
  332.  
  333. xDrawLines         :: XDrawable             -- drawable
  334.             -> XGcontext             -- gcontext
  335.             -> [XPoint]             -- points
  336.             -> Bool             -- fill-p
  337.             -> IO ()
  338.  
  339. xDrawSegments        :: XDrawable             -- drawable
  340.             -> XGcontext             -- gcontext
  341.             -> [(XPoint,XPoint)]        -- segments
  342.             -> IO ()
  343.  
  344. xDrawRectangle         :: XDrawable             -- drawable
  345.             -> XGcontext            -- gcontext
  346.             -> XRect             -- (x,y,width,height)
  347.             -> Bool             -- fill-p
  348.             -> IO ()
  349.  
  350. xDrawRectangles     :: XDrawable             -- drawable
  351.             -> XGcontext             -- gcontext
  352.             -> [XRect]             -- rectangles
  353.             -> Bool             -- fill-p
  354.             -> IO ()
  355.  
  356. xDrawArc        :: XDrawable             -- drawable
  357.             -> XGcontext             -- gcontext
  358.             -> XArc             -- (x,y,w,h,a1,a2)
  359.             -> Bool             -- fill-p
  360.             -> IO ()
  361.  
  362. xDrawArcs        :: XDrawable             -- drawable
  363.             -> XGcontext             -- gcontext
  364.             -> [XArc]             -- arcs
  365.             -> Bool             -- fill-p
  366.             -> IO ()
  367.  
  368. xDrawGlyph        :: XDrawable             -- drawable
  369.             -> XGcontext             -- gcontext
  370.             -> XPoint             -- (x,y)
  371.             -> Char             -- element
  372.             -> IO (XMaybe Int)        -- width
  373.  
  374. xDrawGlyphs        :: XDrawable             -- drawable
  375.             -> XGcontext             -- gcontext
  376.             -> XPoint             -- (x,y)
  377.             -> String            -- sequence
  378.             -> IO (XMaybe Int)        -- width
  379.  
  380. xDrawImageGlyph        :: XDrawable             -- drawable
  381.             -> XGcontext             -- gcontext
  382.             -> XPoint             -- (x,y)
  383.             -> Char             -- element
  384.             -> IO (XMaybe Int)        -- width
  385.  
  386. xDrawImageGlyphs    :: XDrawable             -- drawable
  387.             -> XGcontext             -- gcontext
  388.             -> XPoint             -- (x,y)
  389.             -> String             -- sequence
  390.             -> IO (XMaybe Int)        -- width
  391.  
  392. -- IMAGES
  393.  
  394. xImageBlueMask        :: XImage -> XMaybe XPixel 
  395. xImageDepth         :: XImage -> Int 
  396. xImageGreenMask        :: XImage -> XMaybe XPixel
  397. xImageSize        :: XImage -> XSize 
  398. xImageName        :: XImage -> String 
  399. xSetImageName        :: XImage -> String -> IO () 
  400. xImageRedMask        :: XImage -> XMaybe XPixel
  401. xImageHotSpot        :: XImage -> XMaybe XPoint
  402. xSetImageHotSpot    :: XImage -> XPoint -> IO ()
  403.  
  404. -- XY-format images
  405.  
  406. xImageXYBitmaps        :: XImage -> IO [XBitmap]
  407. xSetImageXYBitmaps    :: XImage -> [XBitmap] -> IO ()
  408.  
  409. -- Z-format images
  410.  
  411. xImageZBitsPerPixel    :: XImage -> IO Int
  412. xsetImageZBitsPerPixel    :: XImage -> Int -> IO ()
  413. xImageZPixarray        :: XImage -> IO XPixarray
  414. xSetImageZPixarray    :: XImage -> XPixarray -> IO ()
  415.  
  416. -- image functions
  417.  
  418. xCreateImage        :: [XImAttribute] -> IO XImage
  419. xCopyImage        :: XImage             -- image
  420.             -> XRect             -- (x,y,width,height)
  421.             -> XImageType             -- result-type
  422.             -> XImage            -- new-image
  423.  
  424. xGetImage        :: XDrawable             -- drawable
  425.             -> XRect             -- (x,y,width,height)
  426.             -> XPixel             -- plane-mask
  427.             -> XImageFormat         -- format
  428.             -> XImageType             -- result-type
  429.             -> IO XImage            -- image
  430.  
  431. xPutImage        :: XDrawable             -- drawable
  432.             -> XGcontext             -- gcontext
  433.             -> XImage             -- ximage
  434.             -> XPoint             -- (src-x,src-y)
  435.             -> XRect            -- (x,y,width,height)
  436.                         -> IO ()
  437.  
  438. -- image files
  439.  
  440. xReadBitmapFile        :: String             -- pathname
  441.             -> IO XImage 
  442.  
  443. xWriteBitmapFile    :: String             -- pathname
  444.             -> XImage -> IO ()
  445.  
  446. -- direct image transfer
  447.  
  448. xGetRawImage        :: XDrawable             -- drawable
  449.             -> XRect             -- (x,y,width,height)
  450.             -> XPixel             -- plane-mask
  451.             -> XImageFormat         -- format
  452.             -> IO XImageData        -- data
  453.  
  454. xPutRawImage        :: XDrawable             -- drawable
  455.             -> XGcontext             -- gcontext
  456.             -> XImageData             -- data
  457.             -> Int                 -- depth
  458.             -> XRect            -- (x,y,width,height)
  459.             -> Int                 -- left-pad
  460.             -> XImageFormat         -- format
  461.             -> IO ()
  462.  
  463. -- FONTS
  464.  
  465. -- opening fonts
  466.  
  467. xOpenFont        :: XDisplay -> String -> IO XFont
  468. xCloseFont        :: XFont -> IO () 
  469. xDiscardFontInfo    :: XFont -> IO ()
  470.  
  471. -- listing fonts
  472.  
  473. xFontPath        :: XDisplay -> IO [String]
  474. xListFontNames        :: XDisplay -> String         -- pattern
  475.             -> IO [String] 
  476. xListFonts        :: XDisplay -> String         -- pattern
  477.             -> IO [XFont]
  478.  
  479. -- font attriburtes
  480.  
  481. xFontAllCharExistsP    :: XFont -> Bool 
  482. xFontAscent        :: XFont -> Int 
  483. xFontDefaultChar    :: XFont -> Int
  484. xFontDescent        :: XFont -> Int 
  485. xFontDirection        :: XFont -> XDrawDirection 
  486. xFontDisplay        :: XFont -> XDisplay
  487. xFontEqual        :: XFont -> XFont -> Int
  488. xFontId            :: XFont -> Int
  489.  
  490. xFontMaxByte1        :: XFont -> Int 
  491. xFontMaxByte2        :: XFont -> Int 
  492. xFontMaxChar        :: XFont -> Int
  493. xFontMinByte1        :: XFont -> Int 
  494. xFontMinByte2        :: XFont -> Int 
  495. xFontMinChar        :: XFont -> Int
  496.  
  497. xFontName        :: XFont -> String
  498.  
  499. xFontMaxCharAscent    :: XFont -> Int 
  500. xFontMaxCharAttributes    :: XFont -> Int 
  501. xFontMaxCharDescent    :: XFont -> Int
  502. xFontMaxCharLeftBearing    :: XFont -> Int
  503. xFontMaxCharRightBearing    :: XFont -> Int
  504. xFontMaxCharWidth    :: XFont -> Int 
  505. xFontMinCharAscent    :: XFont -> Int 
  506. xFontMinCharAttributes    :: XFont -> Int
  507. xFontMinCharDescent    :: XFont -> Int 
  508. xFontMinCharLeftBearing    :: XFont -> Int 
  509. xFontMinCharRightBearing    :: XFont -> Int
  510. xFontMinCharWidth    :: XFont -> Int
  511.  
  512. -- char attributes
  513.  
  514. xCharAscent        :: XFont -> Int -> XMaybe Int
  515. xCharAttributes        :: XFont -> Int -> XMaybe Int
  516. xCharDescent        :: XFont -> Int -> XMaybe Int
  517. xCharLeftBearing    :: XFont -> Int -> XMaybe Int
  518. xCharRightBearing    :: XFont -> Int -> XMaybe Int
  519. xCharWidth        :: XFont -> Int -> XMaybe Int
  520.  
  521. -- querying text size
  522.  
  523. xTextWidth        :: XFont             -- font
  524.             -> String             -- sequence
  525.             -> Int                -- width
  526.  
  527. -- COLORS
  528.  
  529. -- creating colormaps
  530.  
  531. xCreateColormap        :: XVisualInfo             -- visual
  532.             -> XWindow             -- window
  533.             -> Bool             -- alloc-p
  534.             -> IO XColormap
  535.  
  536. xCopyColormapAndFree    :: XColormap -> IO XColormap
  537. xFreeColormap        :: XColormap -> IO ()
  538.  
  539. -- installing colormaps
  540.  
  541. xInstallColormap    :: XColormap -> IO ()
  542. xInstalledColormaps    :: XWindow -> IO [XColormap]
  543. xUnInstallColormap    :: XColormap -> IO ()
  544.  
  545. -- allocating colors
  546.  
  547. xAllocColor        :: XColormap -> XColor
  548.             -> IO (XPixel,             -- pixel
  549.                    XColor,             -- screen-color
  550.                    XColor)            -- exact-color
  551.  
  552. xAllocColorCells    :: XColormap             -- pixel
  553.             -> Int                 -- colors
  554.             -> Int                 -- planes
  555.             -> Bool             -- contiguous
  556.             -> IO ([XPixel],         -- pixels
  557.                    [XPixel])        -- mask
  558.  
  559. xAllocColorPlanes    :: XColormap             -- colormap
  560.             -> Int                 -- colors
  561.             -> Int                 -- reds
  562.             -> Int                 -- greens
  563.             -> Int                 -- blues
  564.             -> Bool             -- contiguous-p
  565.             -> IO ([XPixel],         -- pixel
  566.                    XPixel,             -- red-mask
  567.                    XPixel,             -- green-mask
  568.                    XPixel)            -- blue-mask
  569.  
  570. xFreeColors        :: XColormap -> [XPixel]     -- pixels
  571.             -> XPixel             -- plane-mask
  572.             -> IO ()
  573.  
  574. -- finding colors
  575.  
  576. xLookupColor        :: XColormap -> String         -- name
  577.             -> IO (XColor,             -- screen-color
  578.                    XColor)            -- exact-color
  579.  
  580. xQueryColors        :: XColormap -> [XPixel]     -- pixels
  581.             -> IO [XColor]
  582.  
  583. -- changing colors
  584.  
  585. xStoreColor        :: XColormap -> XPixel         -- pixel
  586.             -> XColor             -- color
  587.             -> IO ()
  588.  
  589. xStoreColors        :: XColormap             -- colormap
  590.             -> [(XPixel, XColor)]         -- pixel-colors
  591.             -> IO ()
  592.  
  593. -- colormap attributes
  594.  
  595. xColormapDisplay    :: XColormap -> XDisplay
  596. xColormapEqual        :: XColormap -> XColormap -> Bool
  597.  
  598. -- CURSORS
  599.  
  600. xCreateCursor        :: XPixmap             -- source
  601.             -> (XMaybe XPixmap)         -- mask
  602.             -> XPoint             -- (x,y)
  603.             -> XColor             -- foreground
  604.             -> XColor             -- background
  605.             -> IO XCursor
  606.  
  607. xCreateGlyphCursor    :: (XFont, char)         -- (src-font,src-char)
  608.             -> (XMaybe (XFont, Char))     -- (mask-font,mask-char)
  609.             -> XColor            -- foreground
  610.             -> XColor             -- background
  611.             -> IO XCursor
  612.  
  613. xFreeCursor        :: XCursor -> IO ()
  614.  
  615. xQueryBestCursor    :: XSize             -- (width,height)
  616.             -> XDisplay -> IO XSize
  617.  
  618. xRecolorCursor        :: XCursor -> XColor         -- foreground
  619.             -> XColor             -- background
  620.             -> IO ()
  621.  
  622. xCursorDisplay        :: XCursor -> XDisplay
  623. xCursorEqual        :: XCursor -> XCursor -> Bool
  624.  
  625. -- ATOMS, PROPERTIES, AND SELECTIONS
  626.  
  627. -- atoms
  628.  
  629. xAtomName        :: XDisplay -> Int         -- atom-id
  630.             -> XAtom
  631.  
  632. xFindAtom        :: XDisplay -> XAtom         -- atom-name
  633.             -> IO (XMaybe Int)
  634.  
  635. xInternAtom        :: XDisplay -> XAtom         -- atom-name
  636.             -> IO (XMaybe Int)
  637.  
  638. -- properties
  639.  
  640. xChangeProperty        :: XWindow             -- window
  641.             -> XAtom             -- property
  642.             -> XProperty             -- (data,type,format)
  643.             -> IO ()
  644.  
  645. xDeleteProperty        :: XWindow -> XAtom -> IO ()
  646. xGetProperty        :: XWindow            -- window
  647.             -> XAtom             -- property
  648.             -> IO XProperty            -- (data,type,format)
  649.  
  650. xListProperties        :: XWindow -> IO [XAtom]
  651. xRotateProperties    :: XWindow             -- window
  652.             -> [XAtom]             -- properties
  653.             -> Int                 -- delta
  654.             -> IO ()
  655.  
  656. -- selections
  657.  
  658. xConvertSelection    :: XAtom             -- selection
  659.             -> XAtom             -- type
  660.             -> XWindow             -- requester
  661.             -> XAtom            -- property
  662.             -> (XMaybe XTime)         -- time
  663.             -> IO ()
  664.  
  665. xSelectionOwner        :: XDisplay             -- display
  666.             -> XAtom             -- selection
  667.             -> IO (XMaybe XWindow)
  668.  
  669. xSetSelectionOwner    :: XDisplay             -- display
  670.             -> XAtom             -- selection
  671.             -> (XMaybe XTime)         -- time
  672.             -> XWindow             -- owner
  673.             -> IO ()
  674.  
  675. -- EVENT
  676.  
  677. -- Wait for the next event 
  678.  
  679. xGetEvent        :: XDisplay -> IO XEvent
  680.  
  681. -- managing the event queue 
  682.  
  683. xQueueEvent        :: XDisplay -> XEvent -> Bool    -- append-p
  684.             -> IO ()
  685.  
  686. xEventListen        :: XDisplay -> IO Int         -- # of events in queue
  687.  
  688. -- sending events 
  689.  
  690. xSendEvent        :: XWindow             -- window
  691.             -> XEvent             -- event key and slots
  692.             -> XEventMask             -- event-mask
  693.             -> IO ()
  694.  
  695. -- pointer position
  696.  
  697. xGlobalPointerPosition    :: XDisplay -> IO XPoint
  698. xPointerPosition    :: XWindow -> IO (XMaybe XPoint)
  699. xMotionEvents        :: XWindow -> XTime -> XTime -> IO [XPoint]
  700. xWarpPointer        :: XWindow -> XPoint -> IO ()
  701.  
  702. -- keyboard input focus
  703.  
  704. xSetInputFocus        :: XDisplay             -- display
  705.             -> XInputFocus             -- focus
  706.             -> XInputFocus            -- revert-to
  707.             -> (XMaybe XTime)         -- time
  708.             -> IO ()
  709.  
  710. xInputFucus        :: XDisplay -> IO (XInputFocus,    -- focus
  711.                        XInputFocus)    -- revert-to
  712.  
  713. -- grabbing the pointer
  714.  
  715. xGrabPointer        :: XWindow             -- window
  716.             -> XEventMask            -- event-mask
  717.             -> [XGrabAttribute]         -- optional attributes
  718.             -> XMaybe XTime         -- time
  719.             -> IO XGrabStatus
  720.  
  721. xUngrabPointer        :: XDisplay -> XMaybe XTime -> IO ()
  722.  
  723. xChangeActivePointerGrab :: XDisplay -> XEventMask     -- event-mask
  724.              -> [XGrabAttribute]         -- cursor
  725.              -> XMaybe XTime -> IO ()
  726.  
  727. -- grabbing a button
  728.  
  729. xGrabButton        :: XWindow             -- window
  730.             -> Int                 -- button
  731.             -> XEventMask             -- event-mask
  732.             -> XStateMask             -- modifiers
  733.             -> [XGrabAttribute]        -- optional attributes
  734.             -> IO ()
  735.  
  736. xUngrabButton        :: XWindow -> Int         -- button
  737.             -> XStateMask             -- modifiers
  738.             -> IO ()
  739.  
  740. -- grabbing the keyboard
  741.  
  742. xGrabKeyboard        :: XWindow             -- window
  743.             -> [XGrabAttribute]         -- optional attributes
  744.             -> XMaybe XTime            -- time
  745.             -> IO XGrabStatus
  746.  
  747. xUngrabkeyboard        :: XDisplay -> XMaybe XTime -> IO ()
  748.  
  749. -- grabbing a key
  750.  
  751. xGrabKey        :: XWindow             -- window
  752.             -> Int                 -- key
  753.             -> XStateMask            -- modifiers
  754.             -> [XGrabAttribute]         -- optional attributes
  755.             -> IO ()
  756.  
  757. xUngrabKey        :: XWindow -> Int -> XStateMask -- modifiers
  758.             -> IO ()
  759.  
  760. -- CONTROL FUNCTIONS
  761.  
  762. -- grabbing the server
  763.  
  764. xGrabServer        :: XDisplay -> IO ()
  765. xUngrabServer        :: XDisplay -> IO ()
  766.  
  767. -- pointer control
  768.  
  769. xSetPointerAcceleration    :: XDisplay -> Float -> IO ()
  770. xSetPointerThreshold    :: XDisplay -> Float -> IO ()
  771. xPointerAcceleration    :: XDisplay -> IO Float
  772. xPointerThreshold    :: XDisplay -> IO Float 
  773. xSetPointerMapping    :: XDisplay -> [Int] -> IO ()
  774. xPointerMapping        :: XDisplay -> IO [Int]
  775.  
  776. -- keyboard control
  777.  
  778. xBell            :: XDisplay -> Int -> IO ()
  779.  
  780. xSetKeyboardKeyClickPercent    :: XDisplay -> Int -> IO ()
  781. xSetKeyboardBellPercent        :: XDisplay -> Int -> IO ()
  782. xSetKeyboardBellPitch        :: XDisplay -> Int -> IO ()
  783. xSetKeyboardBellDuration    :: XDisplay -> Int -> IO ()
  784. xSetKeyboardLed            :: XDisplay -> Integer -> IO ()
  785. xSetKeyboardAutoRepeatMode    :: XDisplay -> XBitVec -> IO ()
  786.  
  787. xKeyboardKeyClickPercent    :: XDisplay -> IO Int
  788. xKeyboardBellPercent        :: XDisplay -> IO Int
  789. xKeyboardBellPitch        :: XDisplay -> IO Int
  790. xKeyboardBellDuration        :: XDisplay -> IO Int
  791.  
  792. xKeyboardLed            :: XDisplay -> IO Integer
  793. xKeyboardAutoRepeatMode        :: XDisplay -> IO XBitVec
  794.  
  795. xModifierMapping        :: XDisplay -> IO [[Int]]
  796. xSetModifierMapping        :: XDisplay -> [[Int]] -> IO (XMaybe ()) 
  797. xQueryKeymap            :: XDisplay -> IO XBitVec
  798.  
  799. -- keyboard mapping
  800.  
  801. xChangeKeyboardMapping         :: XDisplay         -- display
  802.                 -> XKeysymTable     -- keysyms
  803.                 -> IO ()
  804.  
  805. xKeyboardMapping        :: XDisplay         -- display
  806.                 -> IO XKeysymTable    -- mappings
  807.  
  808. xKeycodeKeysym            :: XDisplay         -- display
  809.                 -> Int             -- keycode
  810.                 -> Int             -- keysym-index
  811.                 -> IO XKeysym
  812.  
  813. xKeysymCharacter        :: XDisplay         -- display
  814.                 -> XKeysym               -- keysym
  815.                 -> XStateMask        -- state
  816.                 -> IO (XMaybe Char)
  817.  
  818. xKeycodeCharacter        :: XDisplay         -- display
  819.                 -> Int                  -- keycode
  820.                 -> XStateMask        -- state
  821.                 -> IO (XMaybe Char)
  822.  
  823. -- client termination
  824.  
  825. xAddToSaveSet        :: XWindow -> IO ()
  826. xCloseDownMode        :: XDisplay -> IO XCloseDownMode
  827. xSetCloseDownMode    :: XDisplay -> XCloseDownMode -> IO ()
  828. xKillClient        :: XDisplay -> Int -> IO ()
  829. xKillTemporaryClients    :: XDisplay -> IO ()
  830. xRemoveFromSaveSet    :: XWindow -> IO ()
  831.  
  832. -- managing host access
  833.  
  834. xAccessControl        :: XDisplay -> IO Bool
  835. xSetAccessControl    :: XDisplay -> Bool -> IO ()
  836. xAccessHosts        :: XDisplay -> IO [String]
  837. xAddAccessHost        :: XDisplay -> String -> IO ()
  838. xRemoveAccessHost    :: XDisplay -> String -> IO ()
  839.  
  840. -- screen saver
  841.  
  842. xActivateScreenSaver    :: XDisplay -> IO ()
  843. xResetScreenSaver    :: XDisplay -> IO ()
  844.  
  845. xScreenSaver        :: XDisplay -> IO XScreenSaver
  846. xSetScreenSaver        :: XDisplay -> XScreenSaver -> IO ()
  847.  
  848. {-#
  849.  
  850.  
  851.  
  852. xEventType         :: LispName("sel-event-type")
  853.  
  854. xEventWindow         :: LispName ("x-event-window")
  855. xEventEventWindow    :: LispName ("x-event-event-window")
  856. xEventCode        :: LispName ("x-event-code")
  857. xEventPos        :: LispName ("x-event-pos")
  858. xEventState        :: LispName ("x-event-state")
  859. xEventTime        :: LispName ("x-event-time")
  860. xEventRoot        :: LispName ("x-event-root")
  861. xEventRootPos        :: LispName ("x-event-root-pos")
  862. xEventChild        :: LispName ("x-event-child")
  863. xEventSameScreenP    :: LispName ("x-event-same-screen-p")
  864. xEventHintP        :: LispName ("x-event-hint-p")
  865. xEventMode        :: LispName ("x-event-mode")
  866. xEventKind        :: LispName ("x-event-kind")
  867. xEventFocusP        :: LispName ("x-event-focus-p")
  868. xEventKeymap        :: LispName ("x-event-keymap")
  869. xEventRequest        :: LispName ("x-event-request")
  870. xEventStart        :: LispName ("x-event-start")
  871. xEventCount        :: LispName ("x-event-count")
  872. xEventRect        :: LispName ("x-event-rect")
  873. xEventDrawable        :: LispName ("x-event-drawable")
  874. xEventXGraphFun        :: LispName ("x-event-graph-fun")
  875. xEventPlace        :: LispName ("x-event-place")
  876. xEventBorderWidth    :: LispName ("x-event-border-width")
  877. xEventAboveSibling    :: LispName ("x-event-above-sibling")
  878. xEventOverrideRedirectP    :: LispName ("x-event-override-redirect-p")
  879. xEventParent        :: LispName ("x-event-parent")
  880. xEventConfigureP    :: LispName ("x-event-configure-p")
  881. xEventVisibility    :: LispName ("x-event-state")
  882. xEventNewP        :: LispName ("x-event-new-p")
  883. xEventInstalledP    :: LispName ("x-event-installed-p")
  884. xEventStackMode        :: LispName ("x-event-stack-mode")
  885. xEventValueMask        :: LispName ("x-event-value-mask")
  886. xEventSize        :: LispName ("x-event-size")
  887. xEventMessage        :: LispName ("x-event-message")
  888. xEventPropertyState    :: LispName ("x-event-state")
  889. xEventAtom        :: LispName ("x-event-atom")
  890. xEventSelection        :: LispName ("x-event-selection")
  891. xEventTarget        :: LispName ("x-event-target")
  892. xEventProperty        :: LispName ("x-event-property")
  893. xEventRequestor        :: LispName ("x-event-requestor")
  894.  
  895.  
  896. xSetEventMaskKey     :: LispName ("x-set-event-mask-key")
  897. xClearEventMaskKey     :: LispName ("x-clear-event-mask-key")
  898. xTestEventMaskKey     :: LispName ("x-test-event-mask-key")
  899.  
  900. xSetStateMaskKey     :: LispName ("x-set-state-mask-key")
  901. xClearStateMaskKey     :: LispName ("x-clear-state-mask-key")
  902. xTestStateMaskKey     :: LispName ("x-test-state-mask-key")
  903.  
  904. -- DISPLAYS
  905.  
  906. -- open
  907.  
  908. xOpenDisplay              :: LispName("x-open-display")
  909.  
  910. -- display attributes
  911.  
  912. xDisplayAuthorizationData    :: LispName("xlib:display-authorization-data")
  913. xDisplayAuthorizationName    :: LispName("xlib:display-authorization-name")
  914. xDisplayBitmapFormat        :: LispName("xlib:display-bitmap-format")
  915. xDisplayByteOrder        :: LispName("xlib:display-byte-order")
  916. xDisplayDisplay               :: LispName("xlib:display-display")
  917. xDisplayImageLsbFirstP        :: LispName("xlib:display-image-lsb-first-p")
  918. xDisplayMaxKeycode        :: LispName("xlib:display-max-keycode")
  919. xDisplayMaxRequestLength    :: LispName("xlib:display-max-request-length")
  920. xDisplayMinKeycode        :: LispName("xlib:display-min-keycode")
  921. xDisplayMotionBufferSize    :: LispName("xlib:display-motion-buffer-size")
  922. xDisplayPixmapFormats        :: LispName("xlib:display-pixmap-formats")
  923. xDisplayProtocolMajorVersion :: LispName("xlib:display-protocol-major-version")
  924. xDisplayProtocolMinorVersion :: LispName("xlib:display-protocol-minor-version")
  925. xDisplayResourceIdBase        :: LispName("xlib:display-resource-id-base")
  926. xDisplayResourceIdMask        :: LispName("xlib:display-resource-id-mask")
  927. xDisplayRoots             :: LispName("xlib:display-roots")
  928. xDisplayVendorName        :: LispName("xlib:display-vendor-name")
  929. xDisplayReleaseNumber        :: LispName("xlib:display-release-number")
  930.  
  931. -- output buffer
  932.  
  933. xDisplayAfterFunction        :: LispName("xlib:display-after-function")
  934. xSetDisplayAfterFunction        :: LispName("x-set-display-after-function")
  935. xDisplayForceOutput          :: LispName("xlib:display-force-output")
  936. xDisplayFinishOutput          :: LispName("xlib:display-finish-output")
  937.  
  938. -- close
  939.  
  940. xCloseDisplay             :: LispName("xlib:close-display")
  941.  
  942. -- SCREENS
  943.  
  944. xScreenBackingStores        :: LispName("xlib:screen-backing-stores")
  945. xScreenBlackPixel        :: LispName("xlib:screen-black-pixel")
  946. xScreenDefaultColormap        :: LispName("xlib:screen-default-colormap")
  947. xScreenDepths            :: LispName("x-screen-depths")
  948. xScreenEventMaskAtOpen        :: LispName("xlib:screen-event-mask-at-open")
  949. xScreenSize            :: LispName("x-screen-size")
  950. xScreenMMSize                   :: LispName("x-screen-mmsize")
  951. xScreenMaxInstalledMaps        :: LispName("xlib:screen-max-installed-maps")
  952. xScreenMinInstalledMaps        :: LispName("xlib:screen-min-installed-maps")
  953. xScreenRoot                     :: LispName("xlib:screen-root")
  954. xScreenRootDepth        :: LispName("xlib:screen-root-depth")
  955. xScreenRootVisual        :: LispName("xlib:screen-root-visual")
  956. xScreenSaveUndersP        :: LispName("xlib:screen-save-unders-p")
  957. xScreenWhitePixel         :: LispName("xlib:screen-white-pixel")
  958.  
  959. -- WINDOWS AND PIXMAPS
  960.  
  961. -- drawables
  962.  
  963. xDrawableDisplay    :: LispName("xlib:drawable-display")
  964. xDrawableEqual        :: LispName("xlib:drawable-equal")
  965. xDrawableId        :: LispName("xlib:drawable-id")
  966.  
  967. -- creating windows
  968.  
  969. xCreateWindow           :: LispName("x-create-window")
  970.  
  971. -- window attributes
  972.  
  973. xWindowBorderWidth      :: LispName("xlib:drawable-border-width")
  974. xSetWindowBorderWidth   :: LispName("x-set-drawable-border-width")
  975.  
  976. xDrawableDepth        :: LispName("xlib:drawable-depth")
  977.  
  978. xDrawableSize           :: LispName("x-drawable-size")
  979. xDrawableResize         :: LispName("x-drawable-resize")
  980.  
  981. xWindowPos              :: LispName("x-window-pos")
  982. xWindowMove             :: LispName("x-window-move")
  983.  
  984. xWindowAllEventMasks    :: LispName("xlib:window-all-event-masks")
  985.  
  986. xSetWindowBackground    :: LispName("x-set-window-background")
  987.  
  988. xWindowBackingPixel     :: LispName("xlib:window-backing-pixel")
  989. xSetWindowBackingPixel  :: LispName("x-set-window-backing-pixel")
  990.  
  991. xWindowBackingPlanes    :: LispName("xlib:window-backing-planes")
  992. xSetWindowBackingPlanes :: LispName("x-set-window-backing-planes")
  993.  
  994. xWindowBackingStore     :: LispName("xlib:window-backing-store")
  995. xSetWindowBackingStore  :: LispName("x-set-window-backing-store")
  996.  
  997. xWindowBitGravity    :: LispName("xlib:window-bit-gravity")
  998. xSetWindowBitGravity    :: LispName("x-set-window-bit-gravity")
  999.  
  1000. xSetWindowBorder        :: LispName("x-set-window-border")
  1001.  
  1002. xWindowClass            :: LispName("xlib:window-class")
  1003.  
  1004. xWindowColorMap         :: LispName("xlib:window-colormap")
  1005. xSetWindowColorMap      :: LispName("x-set-window-colormap")
  1006. xWindowColormapInstalledP :: LispName("xlib:window-colormap-installed-p")
  1007.  
  1008. xSetWindowCursor        :: LispName("x-set-window-cursor")
  1009.  
  1010. xWindowDisplay          :: LispName("xlib:window-display")
  1011.  
  1012. xWindowDoNotPropagateMask    :: LispName("xlib:window-do-not-propagate-mask")
  1013. xSetWindowDoNotPropagateMask :: LispName("x-set-window-do-not-propagate-mask")
  1014.  
  1015. xWindowEqual        :: LispName("xlib:window-equal")
  1016.  
  1017. xWindowEventMask    :: LispName("xlib:window-event-mask")
  1018. xSetWindowEventMask    :: LispName("x-set-window-event-mask")
  1019.  
  1020. xWindowGravity        :: LispName("xlib:window-gravity")
  1021. xSetWindowGravity    :: LispName("x-set-window-gravity")
  1022.  
  1023. xWindowId        :: LispName("xlib:window-id")
  1024.  
  1025. xWindowMapState        :: LispName("xlib:window-map-state")
  1026.  
  1027. xWindowOverrideRedirect        :: LispName("xlib:window-override-redirect")
  1028. xSetWindowOverrideRedirect    :: LispName("x-set-window-override-redirect")
  1029.  
  1030. xSetWindowPriority    :: LispName("x-set-window-priority")
  1031.  
  1032. xWindowSaveUnder    :: LispName("xlib:window-save-under")
  1033. xSetWindowSaveUnder    :: LispName("x-set-window-save-under")
  1034. xWindowVisual        :: LispName("xlib:window-visual")
  1035.  
  1036. -- stacking order
  1037.  
  1038. xCirculateWindowDown    :: LispName("xlib:circulate-window-down")
  1039. xCirculateWindowUp    :: LispName("xlib:circulate-window-up")
  1040.  
  1041. -- window hierarchy
  1042.  
  1043. xDrawableRoot        :: LispName("xlib:drawable-root")
  1044. xQueryTree        :: LispName("x-query-tree")
  1045.  
  1046. xReparentWindow        :: LispName("x-reparent-window")
  1047.  
  1048. xTranslateCoordinates    :: LispName("x-translate-coordinates")
  1049.  
  1050. -- mapping windows
  1051.  
  1052. xMapWindow              :: LispName("xlib:map-window")
  1053. xMapSubwindows          :: LispName("xlib:map-subwindows")
  1054. xUnmapWindow        :: LispName("xlib:unmap-window")
  1055. xUnmapSubwindows    :: LispName("xlib:unmap-subwindows")
  1056.  
  1057. -- destroying windows
  1058.  
  1059. xDestroyWindow        :: LispName("xlib:destroy-window")
  1060. xDestroySubwindows    :: LispName("xlib:destroy-subwindows")
  1061.  
  1062. -- pixmaps
  1063.  
  1064. xCreatePixmap           :: LispName("x-create-pixmap")
  1065. xFreePixmap             :: LispName("xlib:free-pixmap")
  1066. xPixmapDisplay        :: LispName("xlib:pixmap-display")
  1067. xPixmapEqual        :: LispName("xlib:pixmap-equal")
  1068.  
  1069. -- GRAPHICS CONTEXTS
  1070.  
  1071. xCreateGcontext       :: LispName("x-create-gcontext")
  1072. xUpdateGcontext          :: LispName("x-update-gcontext")
  1073. xFreeGcontext         :: LispName("xlib:free-gcontext")
  1074.  
  1075. xGcontextDisplay    :: LispName("xlib:gcontext-display")
  1076. xGcontextEqual        :: LispName("xlib:gcontext-equal")
  1077.  
  1078. xGcontextId        :: LispName("xlib:gcontext-id")
  1079.  
  1080. xQueryBestStipple    :: LispName("x-query-best-stipple")
  1081. xQueryBestTile        :: LispName("x-query-best-tile")
  1082.  
  1083. xCopyGcontext        :: LispName("xlib:copy-gcontext")
  1084.  
  1085. -- GRAPHICS OPERATIONS
  1086.  
  1087. xClearArea        :: LispName("x-clear-area")
  1088. xCopyArea        :: LispName("x-copy-area")
  1089. xCopyPlane        :: LispName("x-copy-plane")
  1090. xDrawPoint        :: LispName("x-draw-point")
  1091. xDrawPoints        :: LispName("x-draw-points")
  1092. xDrawLine        :: LispName("x-draw-line")
  1093. xDrawLines        :: LispName("x-draw-lines")
  1094. xDrawSegments        :: LispName("x-draw-segments")
  1095. xDrawRectangle        :: LispName("x-draw-rectangle")
  1096. xDrawRectangles        :: LispName("x-draw-rectangles")
  1097. xDrawArc        :: LispName("x-draw-arc")
  1098. xDrawArcs        :: LispName("x-draw-arcs")
  1099. xDrawGlyph        :: LispName("x-draw-glyph")
  1100. xDrawGlyphs        :: LispName("x-draw-glyphs")
  1101. xDrawImageGlyph        :: LispName("x-draw-image-glyph")
  1102. xDrawImageGlyphs    :: LispName("x-draw-image-glyphs")
  1103.  
  1104. -- IMAGES
  1105.  
  1106. xImageBlueMask        :: LispName("xlib:image-blue-mask")
  1107. xImageDepth         :: LispName("xlib:image-depth")
  1108. xImageGreenMask        :: LispName("xlib:image-green-mask")
  1109. xImageSize        :: LispName("x-image-size")
  1110. xImageName        :: LispName("x-image-name")
  1111. xSetImageName        :: LispName("x-set-image-name")
  1112. xImageRedMask        :: LispName("xlib:image-red-mask")
  1113. xImageHotSpot        :: LispName("x-image-hot-spot")
  1114. xSetImageHotSpot    :: LispName("x-set-image-hot-spot")
  1115.  
  1116. -- XY-format images
  1117.  
  1118. xImageXYBitmaps        :: LispName("xlib:image-xy-bitmap-list")
  1119. xSetImageXYBitmaps    :: LispName("x-set-image-xy-bitmap-list")
  1120.  
  1121. -- Z-format images
  1122.  
  1123. xImageZBitsPerPixel    :: LispName("xlib:image-z-bits-per-pixel")
  1124. xsetImageZBitsPerPixel    :: LispName("x-set-image-z-bits-per-pixel")
  1125. xImageZPixarray        :: LispName("xlib:image-z-pixarray")
  1126. xSetImageZPixarray    :: LispName("x-set-image-z-pixarray")
  1127.  
  1128. -- image functions
  1129.  
  1130. xCreateImage        :: LispName("x-create-image")
  1131. xCopyImage        :: LispName("x-copy-image")
  1132. xGetImage        :: LispName("x-get-image")
  1133. xPutImage        :: LispName("x-put-image")
  1134.  
  1135. -- image files
  1136.  
  1137. xReadBitmapFile        :: LispName("xlib:read-bitmap-file")
  1138. xWriteBitmapFile    :: LispName("xlib:write-bitmap-file")
  1139.  
  1140. -- direct image transfer
  1141.  
  1142. xGetRawImage        :: LispName("x-get-raw-image")    
  1143. xPutRawImage        :: LispName("x-put-raw-image")    
  1144.  
  1145. -- FONTS
  1146.  
  1147. -- opening fonts
  1148.  
  1149. xOpenFont        :: LispName ("xlib:open-font")
  1150. xCloseFont        :: LispName ("xlib:close-font")
  1151. xDiscardFontInfo    :: LispName ("xlib:discard-font-info")
  1152.  
  1153. -- listing fonts
  1154.  
  1155. xFontPath        :: LispName ("xlib:font-path")
  1156. xListFontNames        :: LispName ("xlib:list-font-names")
  1157. xListFonts        :: LispName ("xlib:list-fonts")
  1158.  
  1159. -- font attriburtes
  1160.  
  1161. xFontAllCharExistsP    :: LispName ("xlib:font-all-chars-exist-p")
  1162. xFontAscent        :: LispName ("xlib:font-ascent")
  1163. xFontDefaultChar    :: LispName ("xlib:font-default-char")
  1164. xFontDescent        :: LispName ("xlib:font-descent")
  1165. xFontDirection        :: LispName ("xlib:font-direction")
  1166. xFontDisplay        :: LispName ("xlib:font-display")
  1167. xFontEqual        :: LispName ("xlib:font-equal")
  1168. xFontId            :: LispName ("xlib:font-id")
  1169.  
  1170. xFontMaxByte1        :: LispName ("xlib:font-max-byte1")
  1171. xFontMaxByte2        :: LispName ("xlib:font-max-byte2")
  1172. xFontMaxChar        :: LispName ("xlib:font-max-char")
  1173. xFontMinByte1        :: LispName ("xlib:font-min-byte1")
  1174. xFontMinByte2        :: LispName ("xlib:font-min-byte2")
  1175. xFontMinChar        :: LispName ("xlib:font-min-char")
  1176.  
  1177. xFontName        :: LispName ("x-font-name")
  1178.  
  1179. xFontMaxCharAscent    :: LispName ("xlib:max-char-ascent")
  1180. xFontMaxCharAttributes    :: LispName ("xlib:max-char-attributes")
  1181. xFontMaxCharDescent    :: LispName ("xlib:max-char-descent")
  1182. xFontMaxCharLeftBearing    :: LispName ("xlib:max-char-left-bearing")
  1183. xFontMaxCharRightBearing    :: LispName ("xlib:max-char-right-bearing")
  1184. xFontMaxCharWidth    :: LispName ("xlib:max-char-width")
  1185. xFontMinCharAscent    :: LispName ("xlib:min-char-ascent")
  1186. xFontMinCharAttributes    :: LispName ("xlib:min-char-attributes")
  1187. xFontMinCharDescent    :: LispName ("xlib:min-char-descent")
  1188. xFontMinCharLeftBearing    :: LispName ("xlib:min-char-left-bearing")
  1189. xFontMinCharRightBearing    :: LispName ("xlib:min-char-right-bearing")
  1190. xFontMinCharWidth    :: LispName ("xlib:min-char-width")
  1191.  
  1192. -- char attributes
  1193.  
  1194. xCharAscent        :: LispName ("xlib:char-ascent")
  1195. xCharAttributes        :: LispName ("xlib:char-attributes")
  1196. xCharDescent        :: LispName ("xlib:char-descent")
  1197. xCharLeftBearing    :: LispName ("xlib:char-left-bearing")
  1198. xCharRightBearing    :: LispName ("xlib:char-right-bearing")
  1199. xCharWidth        :: LispName ("xlib:char-width")
  1200.  
  1201. -- querying text size
  1202.  
  1203. xTextWidth        :: LispName ("xlib:text-width")
  1204.  
  1205. -- COLORS
  1206.  
  1207. -- creating colormaps
  1208.  
  1209. xCreateColormap        :: LispName ("xlib:create-colormap")
  1210. xCopyColormapAndFree    :: LispName ("xlib:copy-colormap-and-free")
  1211. xFreeColormap        :: LispName ("xlib:free-colormap")
  1212.  
  1213. -- installing colormaps
  1214.  
  1215. xInstallColormap    :: LispName ("xlib:install-colormap")
  1216. xInstalledColormaps    :: LispName ("xlib:installed-colormaps")
  1217. xUnInstallColormap    :: LispName ("xlib:uninstall-colormap")
  1218.  
  1219. -- allocating colors
  1220.  
  1221. xAllocColor        :: LispName ("x-alloc-color")
  1222. xAllocColorCells    :: LispName ("x-alloc-color-cells")
  1223. xAllocColorPlanes    :: LispName ("x-alloc-color-planes")
  1224.  
  1225. xFreeColors        :: LispName ("xlib:free-colors")
  1226.  
  1227. -- finding colors
  1228.  
  1229. xLookupColor        :: LispName ("x-lookup-color")
  1230. xQueryColors        :: LispName ("xlib:query-colors")
  1231.  
  1232. -- changing colors
  1233.  
  1234. xStoreColor        :: LispName ("xlib:store-color")
  1235. xStoreColors        :: LispName ("x-store-colors")
  1236.  
  1237. -- colormap attributes
  1238.  
  1239. xColormapDisplay    :: LispName ("xlib:colormap-display")
  1240. xColormapEqual        :: LispName ("xlib:colormap-equal")
  1241.  
  1242. -- CURSORS
  1243.  
  1244. xCreateCursor        :: LispName ("x-create-cursor")
  1245. xCreateGlyphCursor    :: LispName ("x-create-glyph-cursor")
  1246. xFreeCursor        :: LispName ("xlib:free-cursor")
  1247.  
  1248. xQueryBestCursor    :: LispName ("x-query-best-cursor")
  1249. xRecolorCursor        :: LispName ("xlib:recolor-cursor")
  1250.  
  1251. xCursorDisplay        :: LispName ("xlib:cursor-display")
  1252. xCursorEqual        :: LispName ("xlib:cursor-equal")
  1253.  
  1254. -- ATOMS, PROPERTIES, AND SELECTIONS
  1255.  
  1256. -- atoms
  1257.  
  1258. xAtomName        :: LispName ("xlib:atom-name")
  1259. xFindAtom        :: LispName ("xlib:find-atom")
  1260. xInternAtom        :: LispName ("xlib:intern-atom")
  1261.  
  1262. -- properties
  1263.  
  1264. xChangeProperty        :: LispName ("x-change-property")
  1265. xDeleteProperty        :: LispName ("xlib:delete-property")
  1266. xGetProperty        :: LispName ("x-get-property")
  1267. xListProperties        :: LispName ("xlib:list-properties")
  1268. xRotateProperties    :: LispName ("xlib:rotate-properties")
  1269.  
  1270. -- selections
  1271.  
  1272. xConvertSelection    :: LispName ("x-convert-selection")
  1273. xSelectionOwner        :: LispName ("xlib:selection-owner")
  1274. xSetSelectionOwner    :: LispName ("x-set-selection-owner")
  1275.  
  1276. -- EVENT
  1277.  
  1278. -- Wait for the next event 
  1279.  
  1280. xGetEvent        :: LispName ("x-get-event")
  1281.  
  1282. -- managing the event queue 
  1283.  
  1284. xQueueEvent        :: LispName ("x-queue-event")
  1285. xEventListen        :: LispName ("x-event-listen")
  1286.  
  1287. -- sending events 
  1288.  
  1289. xSendEvent        :: LispName ("x-send-event")
  1290.  
  1291. -- pointer position
  1292.  
  1293. xGlobalPointerPosition    :: LispName ("x-global-pointer-position")
  1294. xPointerPosition    :: LispName ("x-pointer-position")
  1295. xMotionEvents        :: LispName ("x-motion-events")
  1296. xWarpPointer        :: LispName ("x-warp-pointer")
  1297.  
  1298. -- keyboard input focus
  1299.  
  1300. xSetInputFocus        :: LispName ("x-set-input-focus")
  1301. xInputFucus        :: LispName ("x-input-focus")
  1302.  
  1303. -- grabbing the pointer
  1304.  
  1305. xGrabPointer        :: LispName ("x-grab-pointer")
  1306. xUngrabPointer        :: LispName ("x-ungrab-pointer")
  1307. xChangeActivePointerGrab :: LispName ("x-change-active-pointer-grab")
  1308.  
  1309. -- grabbing a button
  1310.  
  1311. xGrabButton        :: LispName ("x-grab-button")
  1312. xUngrabButton        :: LispName ("x-ungrab-button")
  1313.  
  1314. -- grabbing the keyboard
  1315.  
  1316. xGrabKeyboard        :: LispName ("x-grab-keyboard")
  1317. xUngrabkeyboard        :: LispName ("x-ungrab-keyboard")
  1318.  
  1319. -- grabbing a key
  1320.  
  1321. xGrabKey        :: LispName ("x-grab-key")
  1322. xUngrabKey        :: LispName ("x-ungrab-key")
  1323.  
  1324. -- CONTROL FUNCTIONS
  1325.  
  1326. -- grabbing the server
  1327.  
  1328. xGrabServer        :: LispName ("xlib:grab-server")
  1329. xUngrabServer        :: LispName ("xlib:ungrab-server")
  1330.  
  1331. -- pointer control
  1332.  
  1333. xSetPointerAcceleration    :: LispName ("x-set-pointer-acceleration")
  1334. xSetPointerThreshold    :: LispName ("x-set-pointer-threshold")
  1335. xPointerAcceleration    :: LispName ("x-pointer-acceleration")
  1336. xPointerThreshold    :: LispName ("x-pointer-threshold")
  1337. xSetPointerMapping    :: LispName ("x-set-pointer-mapping")
  1338. xPointerMapping        :: LispName ("xlib:pointer-mapping")
  1339.  
  1340. -- keyboard control
  1341.  
  1342. xBell            :: LispName ("xlib:bell")
  1343.  
  1344. xSetKeyboardKeyClickPercent     :: LispName ("x-set-keyboard-key-click-percent")
  1345. xSetKeyboardBellPercent            :: LispName ("x-set-keyboard-bell-percent")
  1346. xSetKeyboardBellPitch            :: LispName ("x-set-keyboard-bell-pitch")
  1347. xSetKeyboardBellDuration        :: LispName ("x-set-keyboard-bell-duration")
  1348. xSetKeyboardLed                :: LispName ("x-set-keyboard-led")
  1349. xSetKeyboardAutoRepeatMode      :: LispName ("x-set-keyboard-auto-repeat-mode")
  1350.  
  1351. xKeyboardKeyClickPercent    :: LispName ("x-keyboard-key-click-percent")
  1352. xKeyboardBellPercent        :: LispName ("x-keyboard-bell-percent")
  1353. xKeyboardBellPitch        :: LispName ("x-keyboard-bell-pitch")
  1354. xKeyboardBellDuration        :: LispName ("x-keyboard-bell-duration")
  1355. xKeyboardLed            :: LispName ("x-keyboard-led")
  1356. xKeyboardAutoRepeatMode        :: LispName ("x-keyboard-auto-repeat-mode")
  1357.  
  1358. xModifierMapping        :: LispName ("x-modifier-mapping")
  1359. xSetModifierMapping        :: LispName ("x-set-modifier-mapping")
  1360. xQueryKeymap            :: LispName ("xlib:query-keymap")
  1361.  
  1362. -- keyboard mapping
  1363.  
  1364. xChangeKeyboardMapping         :: LispName ("xlib:change-keyboard-mapping")
  1365. xKeyboardMapping        :: LispName ("xlib:keyboard-mapping")
  1366.  
  1367. xKeycodeKeysym            :: LispName ("xlib:keycode->keysym")
  1368. xKeysymCharacter        :: LispName ("x-keysym-character")
  1369. xKeycodeCharacter        :: LispName ("x-keycode-character")
  1370.  
  1371. -- client termination
  1372.  
  1373. xAddToSaveSet        :: LispName ("xlib:add-to-save-set")
  1374. xCloseDownMode        :: LispName ("xlib:close-down-mode")
  1375. xSetCloseDownMode    :: LispName ("x-set-close-down-mode")
  1376. xKillClient        :: LispName ("xlib:kill-client")
  1377. xKillTemporaryClients    :: LispName ("xlib:kill-temporary-clients")
  1378. xRemoveFromSaveSet    :: LispName ("xlib:remove-from-save-set")
  1379.  
  1380. -- managing host access
  1381.  
  1382. xAccessControl        :: LispName ("xlib:access-control")
  1383. xSetAccessControl    :: LispName ("x-set-access-control")
  1384. xAccessHosts        :: LispName ("xlib:access-hosts")
  1385. xAddAccessHost        :: LispName ("xlib:add-access-host")
  1386. xRemoveAccessHost    :: LispName ("xlib:remove-access-host")
  1387.  
  1388. -- screen saver
  1389.  
  1390. xActivateScreenSaver    :: LispName ("xlib:activate-screen-saver")
  1391. xResetScreenSaver    :: LispName ("xlib:reset-screen-saver")
  1392. xScreenSaver        :: LispName ("x-screen-saver")
  1393. xSetScreenSaver        :: LispName ("x-set-screen-saver")
  1394.  
  1395. #-}
  1396.  
  1397. xMArrayCreate     :: [a] -> IO (XMArray a)
  1398. xMArrayLookup     :: XMArray a -> Int -> IO a
  1399. xMArrayUpdate     :: XMArray a -> Int -> a -> IO ()
  1400. xMArrayLength     :: XMArray a -> Int
  1401.  
  1402. {-#
  1403. xMArrayCreate     :: LispName("x-mutable-array-create")
  1404. xMArrayLookup     :: LispName("x-mutable-array-lookup")
  1405. xMArrayUpdate     :: LispName("x-mutable-array-update")
  1406. xMArrayLength     :: LispName("x-mutable-array-length")
  1407. #-}
  1408.  
  1409.  
  1410. xprint            :: a -> IO ()
  1411. {-#
  1412. xprint            :: LispName ("x-print")
  1413. #-}
  1414.  
  1415. getTime        :: IO Integer
  1416. getTimeZone    :: IO Int
  1417. decodeTime    :: Integer -> TimeZone -> ([Int], Bool)
  1418. encodeTime    :: [Int] -> TimeZone -> Integer
  1419. getRunTime    :: IO Float
  1420. getElapsedTime    :: IO Float
  1421. sleep        :: Int -> IO ()
  1422.  
  1423. {-#
  1424.  
  1425. getTime        :: LispName("lisp:get-universal-time")
  1426. getTimeZone    :: LispName("get-time-zone")
  1427. decodeTime    :: LispName("decode-time")
  1428. encodeTime    :: LispName("encode-time")
  1429. getRunTime    :: LispName("get-run-time")
  1430. getElapsedTime    :: LispName("get-elapsed-time")
  1431. sleep        :: LispName("lisp:sleep")
  1432.  
  1433. #-}
  1434.  
  1435. xWmName         :: XWindow -> IO String
  1436. xSetWmName        :: XWindow -> String -> IO ()
  1437.  
  1438. xWmIconName        :: XWindow -> IO String
  1439. xSetWmIconName        :: XWindow -> String -> IO ()
  1440.  
  1441. {-#
  1442. xWmName         :: LispName ("xlib:wm-name")
  1443. xSetWmName        :: LispName ("x-set-wm-name")
  1444.  
  1445. xWmIconName        :: LispName ("xlib:wm-icon-name")
  1446. xSetWmIconName        :: LispName ("x-set-wm-icon-name")
  1447. #-}
  1448.